package com.cgsrp.cgsrp_community.controller;


import com.baidu.aip.contentcensor.AipContentCensor;
import com.cgsrp.utils.ImgCensor;
import com.cgsrp.utils.TextCensor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

@RestController
@RequestMapping("auditing")
public class AuditingController {
    @PostMapping("text")
    public String checkText(String text){
        return TextCensor.TextCensor(text);
    }

    @PostMapping("photo")
    public String checkPhoto(MultipartFile photo){
        return ImgCensor.ImgCensor(photo);
    }
}
